<#assign packageName = content.items.controller.packageName>
<#assign tableName = content.content.tableName>
<#assign lowerName = content.content.lowerName>
<#assign camelName = content.content.camelName>
import request from '@/utils/request'
// 查询
export function get${camelName?cap_first}List(query,data) {
 return request({
    <#list "${packageName}"?split(".") as package>
    <#if package!="com" && package!="ibp" && package!="controller">
    url: '/${package}/${lowerName}/query${camelName?cap_first}List',
    </#if>
    </#list>
    method: 'post',
    params: query,
    data
  })
}

//根据id获取详情
export function get${camelName?cap_first}(id) {
 return request({
    <#list "${packageName}"?split(".") as package>
    <#if package!="com" && package!="ibp" && package!="controller">
    url: '/${package}/${lowerName}/'+id,
    </#if>
    </#list>
    method: 'get'
  })
}

//新增数据
export function add${camelName?cap_first}(data) {
 return request({
    <#list "${packageName}"?split(".") as package>
    <#if package!="com" && package!="ibp" && package!="controller">
    url: '/${package}/${lowerName}/add${camelName?cap_first}',
    </#if>
    </#list>
    method: 'post',
    data: data
  })
}


//编辑数据
export function edit${camelName?cap_first}(data) {
 return request({
    <#list "${packageName}"?split(".") as package>
    <#if package!="com" && package!="ibp" && package!="controller">
    url: '/${package}/${lowerName}/modify${camelName?cap_first}',
    </#if>
    </#list>
    method: 'put',
    data: data
  })
}

//删除数据
export function delete${camelName?cap_first}(id) {
 return request({
    <#list "${packageName}"?split(".") as package>
    <#if package!="com" && package!="ibp" && package!="controller">
    url: '/${package}/${lowerName}/'+id,
    </#if>
    </#list>
    method: 'delete'
  })
}



